<template>
  <div class="floor-list">
    <div class="listContainer" >
      <div class="catelist-head">{{ info.name }}</div>
      <div class="catelist">
        <div class="catelist-item" v-for="item in info.categoryList" :key="item.id">
          <img
            class="item-img"
            :src="item.wapBannerUrl"
          />
          <div class="item-info">{{ item.name }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  name: 'Card',
});
</script>

<script lang="ts" setup>
import { onMounted } from 'vue';
import type { CategoryGroupType } from '@/api/category';
const props = defineProps<{
  info: CategoryGroupType;
}>();
onMounted(() => {
  console.log(props.info.categoryList);
});
</script>

<style scoped>
.catelist-head {
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 4px;
  border-bottom: 2px solid #ededed;
  margin-bottom: 12px;
}
.catelist {
  display: flex;
  /* justify-content: space-around; */
  flex-wrap: wrap;
}
.catelist .catelist-item {
  width: 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.catelist-item .item-img {
  width: 72px;
  height: 72px;
}
.item-info {
  height: 36px;
}
</style>
